package com.qubuyer.core.app

import android.app.Dialog
import android.content.Context
import android.os.Bundle
import android.widget.TextView
import com.qubuyer.core.R

/**
 * Author: linwg
 * Time: 2021/2/2 0002
 * Description:
 */
class LoadingDialog(context: Context,var msg: CharSequence? = null) : Dialog(context, R.style.ProgressDialog) {

    lateinit var tvMessage: TextView

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.dialog_loading)
        tvMessage = findViewById(R.id.tvMessage)
        tvMessage.text = msg
    }

    fun setMessage(msg: CharSequence?){
        this.msg = msg
        tvMessage.text = msg
    }
}